package com.momochen.alarmclockdemo.adapter;

import android.support.v7.widget.RecyclerView;
import android.view.View;

import com.momochen.alarmclockdemo.inter.OnClickRecyclerItemListener;


/**
 * Created by momochen on 2016/8/24.
 */
public class BaseListViewHolder extends RecyclerView.ViewHolder {
    public BaseListViewHolder(View itemView) {
        this(itemView, null);
    }

    public BaseListViewHolder(View itemView, OnClickRecyclerItemListener onClickRecyclerItemListener) {
        super(itemView);
//        ButterKnife.bind(this, itemView);

        if (onClickRecyclerItemListener != null)
            itemView.setOnClickListener(v -> onClickRecyclerItemListener.onClick(itemView, getAdapterPosition()));
    }

    /**
     * 是否需要点击事件
     *
     * @return
     */
    protected boolean isItemOnClick() {
        return true;
    }
}
